package com.qms.qep.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qms.common.annotation.Excel;
import com.qms.common.core.domain.BaseEntity;

/**
 * 检验任务对象 inspection_task
 */
public class InspectionTask extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Integer id;

    /** 检验任务编号 */
    @Excel(name = "检验任务编号")
    private String taskCode;

    /** 产品ID */
    @Excel(name = "产品ID")
    private Integer productId;

    /** 批次ID */
    @Excel(name = "批次ID")
    private Integer batchId;

    /** 工序ID */
    @Excel(name = "工序ID")
    private Integer processId;

    /** 检验类型（如磁粉、超声、原材料等） */
    @Excel(name = "检验类型", readConverterExp = "如=磁粉、超声、原材料等")
    private String inspectionType;

    /** 计划检验日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划检验日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planDate;

    /** 实际检验日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际检验日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualDate;

    /** 检验人员 */
    @Excel(name = "检验人员")
    private String inspector;

    /** 审核人员 */
    @Excel(name = "审核人员")
    private String reviewer;

    /** 抽样数量 */
    @Excel(name = "抽样数量")
    private Integer sampleQuantity;

    /** 状态（1有效 0无效） */
    @Excel(name = "状态", readConverterExp = "1=有效,0=无效")
    private Integer status;

    /** 检验结论 */
    @Excel(name = "检验结论")
    private String inspectionResult;

    /** 任务编号 */
    @Excel(name = "任务编号")
    private String taskNo;

    /** 优先级（1低 2中 3高） */
    @Excel(name = "优先级", readConverterExp = "1=低,2=中,3=高")
    private Integer priority;

    /** 任务状态（1待检验 2检验中 3已完成） */
    @Excel(name = "任务状态", readConverterExp = "1=待检验,2=检验中,3=已完成")
    private Integer taskStatus;

    /** 计划开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planStartTime;

    /** 计划结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planEndTime;

    /** 实际开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualStartTime;

    /** 实际结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualEndTime;

    /** 分配人 */
    @Excel(name = "分配人")
    private String assignor;

    /** 分配时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "分配时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date assignTime;

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setBatchId(Integer batchId) {
        this.batchId = batchId;
    }

    public Integer getBatchId() {
        return batchId;
    }

    public void setProcessId(Integer processId) {
        this.processId = processId;
    }

    public Integer getProcessId() {
        return processId;
    }

    public void setInspectionType(String inspectionType) {
        this.inspectionType = inspectionType;
    }

    public String getInspectionType() {
        return inspectionType;
    }

    public void setPlanDate(Date planDate) {
        this.planDate = planDate;
    }

    public Date getPlanDate() {
        return planDate;
    }

    public void setActualDate(Date actualDate) {
        this.actualDate = actualDate;
    }

    public Date getActualDate() {
        return actualDate;
    }

    public void setInspector(String inspector) {
        this.inspector = inspector;
    }

    public String getInspector() {
        return inspector;
    }

    public void setReviewer(String reviewer) {
        this.reviewer = reviewer;
    }

    public String getReviewer() {
        return reviewer;
    }

    public void setSampleQuantity(Integer sampleQuantity) {
        this.sampleQuantity = sampleQuantity;
    }

    public Integer getSampleQuantity() {
        return sampleQuantity;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setInspectionResult(String inspectionResult) {
        this.inspectionResult = inspectionResult;
    }

    public String getInspectionResult() {
        return inspectionResult;
    }

    public void setTaskNo(String taskNo) {
        this.taskNo = taskNo;
    }

    public String getTaskNo() {
        return taskNo;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setTaskStatus(Integer taskStatus) {
        this.taskStatus = taskStatus;
    }

    public Integer getTaskStatus() {
        return taskStatus;
    }

    public void setPlanStartTime(Date planStartTime) {
        this.planStartTime = planStartTime;
    }

    public Date getPlanStartTime() {
        return planStartTime;
    }

    public void setPlanEndTime(Date planEndTime) {
        this.planEndTime = planEndTime;
    }

    public Date getPlanEndTime() {
        return planEndTime;
    }

    public void setActualStartTime(Date actualStartTime) {
        this.actualStartTime = actualStartTime;
    }

    public Date getActualStartTime() {
        return actualStartTime;
    }

    public void setActualEndTime(Date actualEndTime) {
        this.actualEndTime = actualEndTime;
    }

    public Date getActualEndTime() {
        return actualEndTime;
    }

    public void setAssignor(String assignor) {
        this.assignor = assignor;
    }

    public String getAssignor() {
        return assignor;
    }

    public void setAssignTime(Date assignTime) {
        this.assignTime = assignTime;
    }

    public Date getAssignTime() {
        return assignTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("taskCode", getTaskCode())
            .append("productId", getProductId())
            .append("batchId", getBatchId())
            .append("processId", getProcessId())
            .append("inspectionType", getInspectionType())
            .append("planDate", getPlanDate())
            .append("actualDate", getActualDate())
            .append("inspector", getInspector())
            .append("reviewer", getReviewer())
            .append("sampleQuantity", getSampleQuantity())
            .append("status", getStatus())
            .append("inspectionResult", getInspectionResult())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("taskNo", getTaskNo())
            .append("priority", getPriority())
            .append("taskStatus", getTaskStatus())
            .append("planStartTime", getPlanStartTime())
            .append("planEndTime", getPlanEndTime())
            .append("actualStartTime", getActualStartTime())
            .append("actualEndTime", getActualEndTime())
            .append("assignor", getAssignor())
            .append("assignTime", getAssignTime())
            .toString();
    }
} 